package org.example.test1;

//public abstract class Pet {
public  class Pet {
    private String name;
    private int love;
    private int health;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    //显示宠物个人信息的方法
   // public abstract void print();
    // {
//        System.out.println("name:"+this.name+"\tlove:"+this.love+
//                "\thealth:"+this.health);
//    }

    public void eat(){
        System.out.println(this.name+"正在吃东西");
    }
    public Pet(){}

    public Pet(String name, int love, int health) {
        this.name = name;
        this.love = love;
        this.health = health;
    }
}
